

<!-- 消息详情 -->
<template>
	<view class="content">
		<!-- header部分 -->
		<view class='header-Container header-height'>
			<view class="header-bg"></view>
			<navHeader pageTitle="消息详情" rightBtnType="msgCenter" colorTheme="black" @toggleMenuListHandler="toggleMenuListHandler">
			</navHeader>
		</view>
		<view class="title">{{data.cnTitle}}</view>
		<view class="time">{{data.cnTime}}</view>
		<view class="msg">
			<rich-text :nodes="data.cnDet"></rich-text>
		</view>
		
		<!-- 详情菜单 -->
		<view v-if="showDetailMenu" @click="toggleMenuListHandler()" class="detailMenu-Container">
			<detailMenu></detailMenu>
		</view>
	</view>
</template>

<script>
import navHeader from '@/components/nav-header/nav-header';
	import detailMenu from "@/components/detailMenu/detailMenu";
	export default {
		components: {navHeader,detailMenu},
		data() {
			return {
				icon: {
				},
				data:{},
				showDetailMenu:false
			};
		},
		onLoad(option) {
			
			var that = this;
			
			let data = JSON.parse(option.data); 
			that.data = data;
			that.$api.globalUtil.requestAjax({
				url: '/customerNoticeApi/customerNoticeChangeReadApi',
				method: 'POST',
				data: {
					cnId: data.cnId
				},
				success: function(res) {
					uni.$emit('noticeTipCountUpdate');
					
					// #ifdef APP-PLUS
					//消息角标
					if (plus.os.name.toLowerCase() == 'android') {
					}else {
						that.$api.globalUtil.requestAjax({
							url: '/customerNoticeApi/customerNoticeUnreadCountApi',
							method: 'POST',
							data: {
								cnType: "",
								cnStatus: '0'
							},
							success: function(res) {
								plus.runtime.setBadgeNumber(res.data.response);
							}
						});
					}
					// #endif
				}
			});
		},
		methods: {
			//详情菜单
			toggleMenuListHandler() {
				this.showDetailMenu = !this.showDetailMenu;
			},
		}
	}
</script>

<style lang="less">
	page,
	.content {
		background: #FFFFFF;
		height: 100%;
	}
	.title{
		width: 100%;
		text-align: center;
		color: #333;
		margin-top: 73rpx;
		font-size: 36rpx;
	}
	.time{
		width: 100%;
		text-align: center;
		color: #999999;
		margin-top: 20rpx;
		font-size: 26rpx;
	}
	.msg{
		width: 622rpx;
		margin: 57rpx auto 0 auto;
		color: #666666;
		margin-top: 20rpx;
		font-size: 26rpx;
		
	}
	/* header部分 */
	.header-Container {
		width: 100%;
		height: 176rpx;
		overflow: hidden;
		box-shadow: 0px 1rpx 1rpx 0px rgba(0, 0, 0, 0.08);
		background: rgba(255, 255, 255, 1);
	
		.leftBtns {
			display: flex;
			align-items: center;
			justify-content: flex-start;
			position: absolute;
			bottom: 0;
			width: 100%;
			height: 86rpx;
	
			.back {
				margin-left: 17rpx;
				width: 44rpx;
				height: 44rpx;
			}
		}
	
		.title {
			position: absolute;
			bottom: 0;
			width: 100%;
			height: 86rpx;
			line-height: 86rpx;
			text-align: center;
			font-size: 36rpx;
			font-family: PingFang SC;
			font-weight: bold;
			color: rgba(51, 51, 51, 1);
		}
	}
</style>



